package cn.news.service;

import cn.news.mapper.NewsMapper;
import cn.news.pojo.News;
import cn.news.sevice.NewsService;
import com.alibaba.dubbo.config.annotation.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class NewsServiceImpl implements NewsService {
    @Resource
    private NewsMapper newsMapper;
    @Override
    public List<News> getnewsList(Integer catagoryId, String title) {
        return newsMapper.getnewsList(catagoryId,title);
    }

    @Override
    public int updateNewsByNewsId(News news) {
        return newsMapper.updateNewsByNewsId(news);
    }

    @Override
    public News getNewsBynewsId(Integer newsId) {
        return newsMapper.getNewsBynewsId(newsId);
    }
}
